package javbot.gui.actions;

import java.awt.Toolkit;
import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Icon;
import javax.swing.KeyStroke;

import javbot.gui.JavbotFrame;

public abstract class BaseAction extends AbstractAction {

	protected JavbotFrame frame;
	
	public BaseAction(JavbotFrame frame) {
		super();
		this.frame = frame;
	}
	
    public BaseAction(JavbotFrame frame, String text, Icon icon, String description,
			char accelerator) {
		super(text, icon);
		this.frame = frame;
		putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(accelerator, Toolkit
				.getDefaultToolkit().getMenuShortcutKeyMask()));
		putValue(SHORT_DESCRIPTION, description);
	}	

	public abstract void actionPerformed(ActionEvent e);

}
